package br.cits.jokenpo.shellcooper.dto;

import android.content.ContentUris;
import android.net.Uri;
import android.provider.BaseColumns;


public class RecordDTO {

	public static String[] colunas = new String[] { Records._ID, Records.JOGADOR, Records.DATA, Records.RECORD };

	public static final String AUTHORITY = "br.cits.provider.record";

	public long id;
	public Integer record;
	public String data;
	public String nmJogador;

	public RecordDTO() {
	}

	public RecordDTO(Integer record, String data, String nmJogador) {
		super();
		this.record = record;
		this.data = data;
		this.nmJogador = nmJogador;
	}

	public RecordDTO(long id, Integer record, String data, String nmJogador) {
		super();
		this.id = id;
		this.record = record;
		this.data = data;
		this.nmJogador = nmJogador;
	}


	public static final class Records implements BaseColumns {
	
		private Records() {
		}
	
		public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/records");
	
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.google.records";
	
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.google.records";
	
		public static final String DEFAULT_SORT_ORDER = "_id ASC";
	
		public static final String RECORD = "record";
		public static final String DATA = "data";
		public static final String JOGADOR = "nome_jogador";
	
		public static Uri getUriId(long id) {
			Uri uri = ContentUris.withAppendedId(Records.CONTENT_URI, id);
			return uri;
		}
	}

	@Override
	public String toString() {
		return "Jogador: " + nmJogador + ", Record: " + record;
	}
}
